import {ChatOpenAI} from "@langchain/openai";
import {ChatOllama} from "@langchain/ollama";


const {
    RICH_QWEN_KEY,
    RICH_QWEN_BASE_URL,
    RICH_QWEN_MODEL,
    RICH_LOCAL_BASE_URL,
    RICH_LOCAL_MODEL,
} = import.meta.env

export const GetQwen = async (): Promise<ChatOpenAI> => {
    return new ChatOpenAI({
        apiKey: RICH_QWEN_KEY,
        model: RICH_QWEN_MODEL,
        temperature: 0.1,
        topP:0.2,
        configuration: {
            baseURL: RICH_QWEN_BASE_URL,
        }
    })
}


export const GetLocal = async (): Promise<ChatOllama> => {
    return new ChatOllama({
        baseUrl: RICH_LOCAL_BASE_URL,
        temperature: 0.1,
        topP:0.2,
        model: RICH_LOCAL_MODEL
    })
}

